package com.imooc.activitiweb.listener;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.Expression;
import org.activiti.engine.delegate.JavaDelegate;

/**
 * @author jickey
 * @date 2021-09-22
 */
public class SendMsgListener implements JavaDelegate {

    private Expression text1;

    @Override
    public void execute(DelegateExecution delegateExecution) {
        System.out.println("发送消息任务开始执行");
        String value1 = (String) text1.getValue(delegateExecution);
        System.out.println(value1);
        delegateExecution.setVariable("var1",new StringBuffer(value1).reverse().toString());
        System.out.println(delegateExecution.getEventName());
        System.out.println(delegateExecution.getProcessDefinitionId());
        System.out.println(delegateExecution.getProcessInstanceId());
        System.out.println(delegateExecution.getProcessInstanceBusinessKey());

    }
}
